﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Sispe.Entities;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Sispe.Repository.Mapping
{
    public class AREA_CONTRATOMap:EntityTypeConfiguration<AREA_CONTRATO>
    {
        public AREA_CONTRATOMap()
        {
            //Primary Key
            this.HasKey(t => t.IdAreaContrato);

            //Properties
            this.Property(t => t.Descripcion)
                .IsRequired()
                .HasMaxLength(15);

            //Table & Column Mappings
            this.ToTable("AREA_CONTRATO");
            this.Property(t => t.IdAreaContrato).HasColumnName("IdAreaContrato");
            this.Property(t => t.Descripcion).HasColumnName("Descripcion");
        }
    }
}
